package boot.spring.controller;

import boot.spring.entity.Module;
import boot.spring.entity.PermissionsModule;
import boot.spring.service.ModuleService;
import boot.spring.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/*模块页面的controller*/
@RequestMapping("/ModuleController")
@RestController
public class ModuleController {
    @Autowired/*模块的业务层*/
    private ModuleService moduleService;






    /*修改模块表中的数据*/
    @PostMapping("/ModuleConUp")
    public Result ModuleConUp(Module up){
        return moduleService.ModuleSerUp(up);
    }

    /*删除模块表中的数据*/
    @PostMapping("/ModuleConDel")
    public Result ModuleConDel(Module del){
        return moduleService.ModuleSerDel(del);
    }

    /*新增模块表中的数据*/
    @PostMapping("/ModuleConAdd")
    public Result ModuleConAdd(Module add){
        return moduleService.ModuleSerAdd(add);
    }

}
